#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "game_func.h"
#include "game_type.h"

/*刷新屏幕*/
void api_delay(int cnt){
	int i;
	if(!cnt){
		while(1)
			ScreenUpdate_00109c28();
	}
	else{
		for(i=0;i<cnt;i++)
			ScreenUpdate_00109c28();
	}
	return;
}

/*强制写色盘*/
void api_wpal(int PalID,int PalPtr){
	int i;
	//api_print(0,0,0,3,0,"%02d",PalID);
	for(i=0;i<32;i++){
		DU16(0xa00000 + PalID*64 + i*2) = DU16(PalPtr + i*2);
	}
	return;
}